package cn.baiweigang.uu.enums;

public enum TriggerTypeEnum {

    GE("ge","大于等于(触发价比最新价大)"),
    LE("le","小于(触发价比最新价小)"),
    ;

    private String code;
    private String desc;

    TriggerTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static TriggerTypeEnum byCode(String code){
        TriggerTypeEnum[] directionEnums= TriggerTypeEnum.values();
        for (int i=0;i< directionEnums.length;i++){
            if (directionEnums[i].getCode().equalsIgnoreCase(code)){
                return directionEnums[i];
            }
        }
        return null;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
